using System.Collections.Generic;
using dbvc.data;
using dbvc.Queries;

namespace dbvc.context.Activity
{
    public static class Activity
    {
        public static void delete(this db_activity self)
        {
            GenericQuery<db_activity>.Delete(self);
        }
    }

    public class DeleteActivity
    {
        private readonly IEnumerable<db_activity> activities;
        private db_activity activity;
        private db_user user;

        public DeleteActivity(db_user _principal, IEnumerable<db_activity> _activities)
        {
            user = _principal;
            activities = _activities;
        }

        public void Execute()
        {
            foreach (db_activity a in activities)
            {
                a.delete();
            }
        }
    }
}